<?php

namespace App\Http\Requests\Api;

class AuthMobRequest extends ApiRequest
{
    public function rules()
    {
        return [
            'mobile' => 'bail|required|mobile_verification',
            'code' => 'required',
        ];
    }

    public function attributes()
    {
        return [
            'mobile' => '手机号码',
            'code' => '验证码'
        ];
    }

    public function messages()
    {
        return array_merge(parent::messages(), [
            'mobile.mobile_verification' => '请输入正确的手机号码',
        ]);
    }
}
